<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title><c:if test="${order!=null}">
    <c:out value="${order.orderNo}" />-</c:if>订单详情</title>
<c:import url="/ctrl/header"></c:import>
<link href="/styles/datepicker.css" rel="stylesheet" />
</head>
<body>
  <c:import url="/ctrl/top"></c:import>
  <div class="container">
    <div class="row-fluid">
      <!--/span-->
      <div class="span12">
        <h3 class="greybg">订单详情</h3>
        <c:choose>
          <c:when test="${order!=null}">
            <table
              class="table table-bordered table-striped responsive-utilities">
              <thead>
                <tr>
                  <th colspan="4">订单详情</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td>订单号</td>
                  <td colspan="3">${order.orderNo}</td>
                </tr>
                <tr>
                  <td>保险公司</td>
                  <td colspan="3"><img
                    src="/images/logo/<c:out value="${orderExt.orderProductPic}"/>.gif" />${order.orderProductInsName}</td>
                </tr>
                <tr>
                  <td>保险名称</td>
                  <td colspan="3"><c:out
                      value="${order.orderProductName}" /></td>
                </tr>
                <tr>
                  <td>保险时间</td>
                  <td colspan="3"><c:out
                      value="${orderExt.orderProductTimeDesc}" /></td>
                </tr>
                <tr>
                  <td>保险责任和保险金额</td>
                  <td colspan="3"><c:out
                      value="${orderExt.orderProductIntro}"
                      escapeXml="false" /></td>
                </tr>
                <tr>
                  <td>保险服务</td>
                  <td colspan="3"><c:out
                      value="${orderExt.orderProductServeDesc}"
                      escapeXml="false" /></td>
                </tr>
                <tr>
                  <td>订单状态</td>
                  <td colspan="3"><c:out
                      value="${order.statusDesc}" /></td>
                </tr>
              </tbody>
            </table>

            <c:import url="/order/detailview">
              <c:param name="orderId">
                <c:out value="${order.orderId}" />
              </c:param>
              <c:param name="insType">
                <c:out value="${order.orderProductTypeFid}" />
              </c:param>
            </c:import>
            <c:if test="${order.orderStatusFid=='1'}">
              <div style="text-align: center;">
                <fmt:formatNumber var="orderRealAmount" type="currency"
                  pattern="￥.00" value="${order.orderRealAmount}" />
                订单总金额：<span class="red bold" style="font-size: 18px;">${orderRealAmount}</span>
              </div>
              <br />
              <div style="text-align: center">
                <input type="button" value="取消订单"
                  class="btn-big btn-orange"
                  onclick="CancelOrder('<c:out value="${order.orderId}" />')" />&nbsp;&nbsp;<input
                  type="button" value="去支付"
                  class="button btn-big btn-orange"
                  onclick="payOrder('<c:out value="${order.orderId}" />')" />
              </div>
            </c:if>
          </c:when>
          <c:otherwise>
            <h5>没有相关信息</h5>
          </c:otherwise>
        </c:choose>
      </div>
    </div>
    <hr />
    <c:import url="/ctrl/bottom"></c:import>
  </div>
  <c:import url="/ctrl/footer"></c:import>
  <script src="/scripts/bootstrap-datepicker.js"></script>
</body>
</html>